import conifig from './conifig'
export default(url,data={})=>{
   return new Promise((resolve,reject)=>{
    wx.request({
        url: /^wx/.test(url) ? conifig.host2 + url : conifig.host1 + url,
        data,
        success:(res)=>{
          resolve(res.data)
        },
        fail:(err)=>{
            reject(err);
        }
      })
   })
}